<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AddMoneyTaxIntoRechargePackage extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('recharge_package', function (Blueprint $table) {
            $table->integer('money_tax')->after('money')->nullable()->comment('增值税价格');
            $table->string('valid_days')->after('money_tax')->nullable()->comment('有效时间/天');
            $table->string('max_bandwidth')->after('valid_days')->nullable()->comment('最快速度');
            $table->string('min_bandwidth')->after('max_bandwidth')->nullable()->comment('最慢速度');
            $table->string('max_flow')->after('min_bandwidth')->nullable()->comment('最大流量');
            $table->string('remarks')->after('max_flow')->nullable()->comment('备注');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('recharge_package', function (Blueprint $table) {
            $table->dropColumn('money_tax');
            $table->dropColumn('valid_days');
            $table->dropColumn('max_bandwidth');
            $table->dropColumn('min_bandwidth');
            $table->dropColumn('max_flow');
            $table->dropColumn('remarks');
        });
    }
}
